import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
    system: {
        switchStatus: "open",
        activeIndex: '/home'
    }
}

export default new Vuex.Store({
    state: state,
    mutations: {
        setActiveIndex(state, index) {
            state.system.activeIndex = index
        },
        setSwitchStatus(state, switchStatus) {
            state.system.switchStatus = switchStatus
        }
    }
})